package cn.gson.boot.model.pojos;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Objects;

@Entity
@Table(name = "competitor_", schema = "boot", catalog = "")
public class Competitor {//竞争对手
    private int competitorId;//竞争对手id
    private ContendStatus contendStatus;//竞争状态
    private Date competitorDate;//发现时间
    private String competitorCompany;//公司名称
    private BigDecimal competitorOffer;//对手报价
    private String competitorCapacity;//竞争能力
    private String competitorScheme;//竞争方案
    private String competitorAdvantage;//优势
    private String competitorVinferior;//劣势
    private String competitorStrategy;//应对策略
    private String competitorRemark;//备注
    private int competitorSc;//删除状态
    private Sales sales;//销售机会id
    private Kehu kehu;//客户id

    @Id
    @Column(name = "Competitor_id", nullable = false)
    public int getCompetitorId() {
        return competitorId;
    }

    public void setCompetitorId(int competitorId) {
        this.competitorId = competitorId;
    }

    @ManyToOne
    @JoinColumn(name = "contend_id", referencedColumnName = "contend_id", nullable = false)
    public ContendStatus getContendStatus() {
        return contendStatus;
    }

    public void setContendStatus(ContendStatus contendStatus) {
        this.contendStatus = contendStatus;
    }


    @Basic
    @Column(name = "Competitor_date", nullable = true)
    public Date getCompetitorDate() {
        return competitorDate;
    }

    public void setCompetitorDate(Date competitorDate) {
        this.competitorDate = competitorDate;
    }

    @Basic
    @Column(name = "Competitor_company", nullable = true, length = 200)
    public String getCompetitorCompany() {
        return competitorCompany;
    }

    public void setCompetitorCompany(String competitorCompany) {
        this.competitorCompany = competitorCompany;
    }

    @Basic
    @Column(name = "Competitor_offer", nullable = true, precision = 2)
    public BigDecimal getCompetitorOffer() {
        return competitorOffer;
    }

    public void setCompetitorOffer(BigDecimal competitorOffer) {
        this.competitorOffer = competitorOffer;
    }

    @Basic
    @Column(name = "Competitor_capacity", nullable = true, length = 200)
    public String getCompetitorCapacity() {
        return competitorCapacity;
    }

    public void setCompetitorCapacity(String competitorCapacity) {
        this.competitorCapacity = competitorCapacity;
    }

    @Basic
    @Column(name = "Competitor_scheme", nullable = true, length = 200)
    public String getCompetitorScheme() {
        return competitorScheme;
    }

    public void setCompetitorScheme(String competitorScheme) {
        this.competitorScheme = competitorScheme;
    }

    @Basic
    @Column(name = "Competitor_advantage", nullable = true, length = 200)
    public String getCompetitorAdvantage() {
        return competitorAdvantage;
    }

    public void setCompetitorAdvantage(String competitorAdvantage) {
        this.competitorAdvantage = competitorAdvantage;
    }

    @Basic
    @Column(name = "Competitor_vinferior", nullable = true, length = 200)
    public String getCompetitorVinferior() {
        return competitorVinferior;
    }

    public void setCompetitorVinferior(String competitorVinferior) {
        this.competitorVinferior = competitorVinferior;
    }

    @Basic
    @Column(name = "Competitor_strategy", nullable = true, length = 200)
    public String getCompetitorStrategy() {
        return competitorStrategy;
    }

    public void setCompetitorStrategy(String competitorStrategy) {
        this.competitorStrategy = competitorStrategy;
    }

    @Basic
    @Column(name = "Competitor_remark", nullable = true, length = 200)
    public String getCompetitorRemark() {
        return competitorRemark;
    }

    public void setCompetitorRemark(String competitorRemark) {
        this.competitorRemark = competitorRemark;
    }

    @Basic
    @Column(name = "Competitor_sc", nullable = true, length = 10)
    public int getCompetitorSc() {
        return competitorSc;
    }

    public void setCompetitorSc(int competitorSc) {
        this.competitorSc = competitorSc;
    }

    @ManyToOne
    @JoinColumn(name = "sales_id", referencedColumnName = "sales_id", nullable = false)
    public Sales getSales() {
        return sales;
    }

    public void setSales(Sales sales) {
        this.sales = sales;
    }

    @ManyToOne
    @JoinColumn(name = "k_id", referencedColumnName = "k_id", nullable = false)
    public Kehu getKehu() {
        return kehu;
    }

    public void setKehu(Kehu kehu) {
        this.kehu = kehu;
    }

    @Override
    public String toString() {
        return "Competitor{" +
                "competitorId=" + competitorId +
                ", contendStatus=" + contendStatus +
                ", competitorDate=" + competitorDate +
                ", competitorCompany='" + competitorCompany + '\'' +
                ", competitorOffer=" + competitorOffer +
                ", competitorCapacity='" + competitorCapacity + '\'' +
                ", competitorScheme='" + competitorScheme + '\'' +
                ", competitorAdvantage='" + competitorAdvantage + '\'' +
                ", competitorVinferior='" + competitorVinferior + '\'' +
                ", competitorStrategy='" + competitorStrategy + '\'' +
                ", competitorRemark='" + competitorRemark + '\'' +
                ", competitorSc=" + competitorSc +
                ", sales=" + sales +
                ", kehu=" + kehu +
                '}';
    }
}
